import QtQuick 2.2

Rectangle {
    id: lineinput
    width: texttype.width + input.width
    height: 25
    color: "transparent"


    property string texttype: ""
    property string text: input.text
    property bool echoPassword: false


    Text {
        id: texttype
        anchors.verticalCenter: input.verticalCenter
        text: lineinput.texttype
        font.pointSize: 10
    }

    Rectangle {
        id: input
        property string text: textInput.text

        anchors.left: texttype.right
        anchors.leftMargin: 8
        width: 150
        height: 25
        radius: 5
        border.color: "gray"
        MouseArea {
            anchors.fill: parent
            onClicked: { rectangle.focus = true; }
        }
        TextInput {
            id: textInput
            anchors { leftMargin: 8; rightMargin: 8; fill:parent }
            echoMode: lineinput.echoPassword ? TextInput.Password : TextInput.Normal
            focus: true
            font.pointSize: 14
            clip: true
        }
    }
}
